package com.shen.pojo;

import com.shen.util.RandomNumber;

import java.util.Random;

/**
 * Author:shen
 * CreateDate:2020/4/26.
 * Function:
 */
public class User {
    private String name;//用户名
    private String password;//用户密码
    private int num;//用户卡号

    RandomNumber randomNumber=new RandomNumber();

    public User(String name, String password) {
        this.name = name;
        this.password = password;
        this.num = randomNumber.getRandomNum();
    }

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", num=" + num +
                ", randomNumber=" + randomNumber +
                '}';
    }
}
